package com.qingcloud.base.passwordencode;

import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;

public class Md5PasswordEncoderTest {

    public  static  void main(String[] args) {
        PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
        String encode = passwordEncoder.encode("Aqi123456");
        System.out.println("加密后的密码:" + encode);

        Md5PasswordEncoder md5PasswordEncoder = new Md5PasswordEncoder();
        String encode1 = md5PasswordEncoder.encodePassword("WMhq110119","admin");
        System.out.println("MD5加密后的密码:" + encode1);
        //63a6df1b905bc407356a87190fbf29b8
    }
}
